package com.gidgabs.modules.entity;

import com.gidgabs.dto.TbUserIncomeDto;

import java.io.Serializable;
import java.util.Date;



/**
 * 用户关系表-收入明细表
 * 
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-06-29 17:16:11
 */
public class TbUserIncomeEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	/**日志打赏*/
	public static final String REVENUE_TYPE_JOURNAL_REWARD="JOURNAL_REWARD";
	/**日志转载*/
	public static final String REVENUE_TYPE_JOURNAL_REPRINT="JOURNAL_REPRINT";
	/**跑腿*/
	public static final String REVENUE_TYPE_RUN_LGE="RUN_LEG";
	/**产品*/
	public static final String REVENUE_TYPE_PRODUCT="RPODUCT";

	//
	private Integer id;
	//支付用户
	private Integer userId;
	//收入类型 1产品 2 转发 3 跑腿 4 广告（不明确 因为不知道广告怎样产生效益）
	private String revenueType;
	//创建时间
	private Date createTime;
	//金额
	private Integer price;
	//描述
	private String depict;
	//关联实体id
	private Integer linkId;


	public TbUserIncomeEntity() {
	}

	public TbUserIncomeEntity(Integer journalId, Integer currentUserId, int moneyCent ,String revenueType) {
		this.linkId=journalId;
		this.userId=currentUserId;
		this.price=moneyCent;
		this.createTime=new Date();
		this.revenueType=revenueType;
	}

	/**
	 * 设置：
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：
	 */
	public Integer getId() {
		return id;
	}


	/**
	 * 设置：收入类型 1产品 2 转发 3 跑腿 4 广告（不明确 因为不知道广告怎样产生效益）
	 */
	public void setRevenueType(String revenueType) {
		this.revenueType = revenueType;
	}
	/**
	 * 获取：收入类型 1产品 2 转发 3 跑腿 4 广告（不明确 因为不知道广告怎样产生效益）
	 */
	public String getRevenueType() {
		return revenueType;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * 设置：金额
	 */
	public void setPrice(Integer price) {
		this.price = price;
	}
	/**
	 * 获取：金额
	 */
	public Integer getPrice() {
		return price;
	}

	public String getDepict() {
		return depict;
	}

	public void setDepict(String depict) {
		this.depict = depict;
	}

	public Integer getLinkId() {
		return linkId;
	}

	public void setLinkId(Integer linkId) {
		this.linkId = linkId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public TbUserIncomeDto toDto(){
		TbUserIncomeDto tbuserincomedto=new TbUserIncomeDto();
		tbuserincomedto.setUserId(this.getUserId());
		tbuserincomedto.setLinkId(this.getLinkId());
		tbuserincomedto.setId(this.getId());
		tbuserincomedto.setRevenueType(this.getRevenueType());
		tbuserincomedto.setCreateTime(this.getCreateTime());
		tbuserincomedto.setPrice(this.getPrice());
		tbuserincomedto.setDepict(this.getDepict());
		return tbuserincomedto;
	}
}
